import request from '@/utils/request'
const api_name = '/manage/admin/tags'

export function getTagPageList(page,limit,data) {
  return request({
    url: `${api_name}/${page}/${limit}`,
    method: 'get',
    params: data
  })
}

export function updateTag(id,data) {
  return request({
    url: `${api_name}/${id}`,
    method: 'put',
    data
  })
}

export function saveTag(data) {
  return request({
    url: `${api_name}`,
    method: 'post',
    data
  })
}

export function deleteTag(id) {
  return request({
    url: `${api_name}/${id}`,
    method: 'delete'
  })
}

export function getTagById(id) {
  return request({
    url: `${api_name}/${id}`,
    method: 'get'
  })
}

export function getAllTag() {
  return request({
    url: `${api_name}/list`,
    method: 'get'
  })
}
